#!/usr/bin/python
from timeit import Timer

count = 9999999

Timer( '07', '07' ).timeit( count ) / float( count )

setup = \
"""07
class what():
 def __init__(self):
  self.hi = 3
 def x(self):
  hi = self.hi
  self.hi
y=what()
07"""

statement = \
"""07
y.x()
07"""

print Timer( statement, setup ).timeit( count ) / float( count )

Timer( '07', '07' ).timeit( count ) / float( count )

setup = \
"""07
class what():
 def __init__(self):
  self.hi = 3
 def x(self):
  hi = self.hi
  hi
y=what()
07"""


statement = \
"""07
y.x()
07"""

print Timer( statement, setup ).timeit( count ) / float( count )

# <= is faster than <
# 07 is fastest
